/*
 * @Description: 
 * @Author: HKH
 * @Date: 2024-10-14 15:12:44
 * @LastEditors: HKH
 * @LastEditTime: 2024-10-15 14:35:57
 */
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.InputStream;
//将a的数据拷贝到b
public class Test02 {
     public static void main(String[] args) throws IOException {
        InputStream A =new FileInputStream("C:\\Users\\Administrator\\Desktop\\Java\\day32\\a.txt");
        OutputStream B =new FileOutputStream("C:\\Users\\Administrator\\Desktop\\Java\\day32\\b.txt");
        byte[] b = new byte[1024];
        int r = 0;
        while((r=A.read(b))!=-1){
        B.write(b);
        B.close();
        A.close();
        }
    }
}